﻿using DevWeb.BizTalk.DeploymentFramework.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace DevWeb.BizTalk.BTSTemplate.Task.Tests
{
    [TestClass]
    public class UnitTest1
    {
        [TestMethod]
        public void TestGetDeploymentSettingsTask()
        {
            GetEnvironmentSettingsTasks task = new GetEnvironmentSettingsTasks();
            task.ProductId = "F6EE55DA-16D2-4A90-AE0D-D684F45ACE5E";
            task.ProductUpgradeCode = "8E55E48E-2C3B-4A37-8750-4192B9EA38D9";
            task.Version = "1.0.0";
            task.ServiceAddress = "http://localhost/DeploymentService/DeploymentSettingService.svc/wshttp";
            task.ProjectName = "Test";
            task.SettingFilePath = @"d:\\temp\\test.xml";
            task.Execute();

        }

        [TestMethod]
        public void TestDFZGetDeploymentSettingsTask()
        {

            GetEnvironmentSettingsTasks task = new GetEnvironmentSettingsTasks();
            task.ProductId = "48A2D966-C538-42F6-98CD-FE1662490BDD";
            task.ProductUpgradeCode = "E1560037-C889-44F7-9503-1BEA0DBBA45C";
            task.Version = "1.0.0";
            task.ServiceAddress = "http://dfz-vm301/DeploymentService/DeploymentSettingService.svc/wshttp";
            task.ProjectName = "Test";
            task.SettingFilePath = @"d:\\temp\\test.xml";
            task.Execute();

        }

        [TestMethod]
        public void LogDeploymentTest()
        {
            var task = new LogDeploymentTask();
            task.ProductId = "F6EE55DA-16D2-4A90-AE0D-D684F45ACE5E";
            task.ProductUpgradeCode = "8E55E48E-2C3B-4A37-8750-4192B9EA38D9";
            task.Version = "1.0.0";
            task.ServiceAddress = "http://localhost/DeploymentService/DeploymentSettingService.svc/wshttp";
            task.ProjectName = "Test";
      
            Assert.IsTrue(task.Execute());

        }
    }
}
